<?php
/**
 * wangjianbao
 */
namespace app\common\model;

use think\Model;
use traits\model\SoftDelete;

/**
 * 分类模型
 */
class GoldLog extends Model
{
	protected $table="dsc_gold_log";
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';

    public static function addLogNum($uid,$gold_num,$type=1,$mark=''){
		$data=[
			'uid'=>$uid,
			'gold_num'=>$gold_num,
			'type'=>$type,
			'mark'=>$mark,
		];

		$res=self::create($data,true);
		if($res !== false){
			return true;
		}else{
			return false;
		}
	}

}
